package demo.controller;

import demo.enity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {

    @Autowired
    private User user;

    public void printUser() {
        System.out.println("before: " + user);
        User myUser = user;
        myUser.setName("李四");
        System.out.println("myUser: " + myUser);
        System.out.println("user: " + user);
    }
}
